
/*
 * @Author: wuheng wuheng@szhbzc.com
 * @Date: 2024-12-17 15:58:46
 * @LastEditors: wuheng wuheng@szhbzc.com
 * @LastEditTime: 2025-03-03 09:45:54
 * @FilePath: \web-appc:\Users\wuheng\Desktop\WugangNew\src\api\Dashmana.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/newrequst";

// 查询菜品分类树
export const getDishTypeApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-type/tree`, method: "post", data
  });
};
// 分页查询菜品分类列表
export const getDishClassListApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-type/page`, method: "post", data
  });
};
// 编辑菜品分类
export const editDishTypeApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-type/edit`, method: "post", data
  });
};
// 查看菜品属性 tab切换数组
export const GetDishTypeAttributeApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-attribute/list`, method: "post", data
  });
};
// 获取菜品属性列表
export const GetDishTypeValueListApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-attribute-value/page`, method: "post", data
  });
};

export const GetDishTypeattributeScope = (data: any) => {
  return request({
    url: `/base/v1/public/dish-attribute-value/list-scope`, method: "post", data
  });
};

// 编辑菜品属性
export const editDishTypeAttributeApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-attribute-value/edit`, method: "post", data
  });
};
// 新增菜品属性
export const AddDishTypeAttributeApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-attribute-value/add`, method: "post", data
  });
};
// 启用禁用菜品属性
export const enableDishTypeAttributeApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-attribute-value/setting-enable-state`, method: "post", data
  });
};
// 查看菜品信息分页数据
export const getDishinfoListApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish/page`, method: "post", data
  });
};
//添加菜品
export const AddDishApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish/add`, method: "post", data
  });
};
//生成菜品编码
export const GetGeneratedishCodeApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish/generate-dish-code`, method: "post", data
  });
};
//编辑菜品
export const editDishApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish/edit`, method: "post", data
  });
};
//删除菜品
export const deleteDishApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish/delete`, method: "post", data
  });
};
//查看BOM Page数据
export const GetBomPageListApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish/bom-page`, method: "post", data
  });
};
// 查看bom食材
export const GetBomdishPageListApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom/page`, method: "post", data
  });
};
// 查看食材分组列表
export const GetBomdishIngredientsListApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom/ingredients-list`, method: "post", data
  });
};
//新增菜品食材BOM
export const AddBomdishApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom/add`, method: "post", data
  });
};
// 删除菜品食材BOM /base/v1/public/dish-bom/delete
export const DeleteBomdishApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom/delete`, method: "post", data
  });
};
// 修改菜品食材BOM
export const EditBomdishApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom/edit`, method: "post", data
  });
};
// 耗材BOM查询
export const GetDishBomConsumablesApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom-consumables/page`, method: "post", data
  });
};
// 新增耗材菜品BOM 
export const AddDishBomConsumablesApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom-consumables/add`, method: "post", data
  });
};
// 删除耗材菜品
export const DeleteDishBomConsumablesApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom-consumables/delete`, method: "post", data
  });
};
// 更新耗材菜品
export const EditDishBomConsumablesApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom-consumables/edit`, method: "post", data
  });
};
//菜品BOM详情/base/v1/public/dish/query-one
export const GttDishBomDetalApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish/query-one`, method: "post", data
  });
};
// 定价信息查询
export const GetDishPricingApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-pricing/query-one`, method: "post", data
  });
};
// 查看菜品历史
export const GetDishSellingApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-history-selling/page`, method: "post", data
  });
};
// 菜品定价分页查询
export const GetDishPricingListApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-pricing/page`, method: "post", data
  });
};
// 菜品核算
export const GetDishAccountingListApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-pricing/cost-accounting-page`, method: "post", data
  });
};
// 编辑菜品定价
export const EditDishPricingApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-pricing/edit`, method: "post", data
  });
};
// 批量保存菜品BOM 
export const EditSaveBatchApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-bom/save-batch`, method: "post", data
  });
};
// 菜品审核
export const AuditDishPricingApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-pricing/audit`, method: "post", data
  });
};
// 检测菜品名称是否存在
export const GetCheckNameApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish/check-name-exist`, method: "post", data
  });
};
//获取未匹配SKU数量
export const GetSkuDishCountApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-pricing/no-match-sku-dish-count`, method: "post", data
  });
};
// 刷新菜品定价接口
export const ReloadCostApi = (data: any) => {
  return request({
    url: `/base/v1/public/dish-pricing/reload-cost`, method: "post", data
  });
};


